//
// Created by 罗玉龙 on 2017/6/18.
//

#include "explicltFunction.h"
class Test1
{
public:
    Test1(int n)
    {
        num = n;
    }

private:
    int num;
};
class Test2
{
public:
    explicit Test2(int n)
    {
        num = n;
    }

private:
    int num;
};
int testExplicit()
{
    Test1 t1 = 12;
//    Test2 t2 = 12;//编译错误，不能隐式调用其构造函数
    Test2 t2(12);
    return 0;

}